import 'package:flutter/material.dart';

void showBindSheet(BuildContext context, Function callBack) {
  showModalBottomSheet(
      context: context,
      builder: (context) {
        return Container(
          width: double.infinity,
          height: 180,
          alignment: Alignment.center,
          child: Column(
            children: [
              Container(
                height: 60,
                decoration: const BoxDecoration(
                    border: Border(
                        bottom: BorderSide(width: 0.5, color: Colors.grey))),
                child: GestureDetector(
                  onTap: () {},
                  child: const Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Icon(Icons.camera_alt),
                      SizedBox(
                        width: 10,
                      ),
                      Text(
                        '拍照',
                        style: TextStyle(fontSize: 20),
                      )
                    ],
                  ),
                ),
              ),
              Container(
                height: 60,
                decoration: const BoxDecoration(
                    border: Border(
                        bottom: BorderSide(width: 0.5, color: Colors.grey))),
                child: GestureDetector(
                  onTap: () {
                    // _selectPhoto();
                    callBack();
                  },
                  child: const Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Icon(Icons.phone_android),
                      SizedBox(
                        width: 10,
                      ),
                      Text(
                        '相册',
                        style: TextStyle(fontSize: 20),
                      )
                    ],
                  ),
                ),
              ),
              Container(
                height: 60,
                decoration: const BoxDecoration(
                    border: Border(
                        bottom: BorderSide(width: 0.5, color: Colors.grey))),
                child: GestureDetector(
                  onTap: () {
                    Navigator.pop(context);
                  },
                  child: const Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Icon(Icons.cancel_outlined),
                      SizedBox(
                        width: 10,
                      ),
                      Text(
                        '取消',
                        style: TextStyle(fontSize: 20),
                      )
                    ],
                  ),
                ),
              ),
            ],
          ),
        );
      });
}
